﻿using System.Collections.Generic;
using TallComponents.Web.Pdf;

namespace TallComponents.Web.Storage
{
   /// <summary>
   /// Interface contract for classes that store PDF documents.
   /// </summary>
   public interface IPdfStorage
   {
      /// <summary>
      /// Gets the page in a PDF document.
      /// </summary>
      /// <param name="key">The key that identifies the document to get a page from.</param>
      /// <param name="pageIndex">Index of the page.</param>
      /// <returns>A <see cref="Page"/> or <c>null</c>.</returns>
      Page GetPage( string key, int pageIndex );
      /// <summary>
      /// Gets the PDF document with the specified key.
      /// </summary>
      /// <param name="key">The key that identifies the document to fetch.</param>
      /// <returns>A PDF <see cref="Document"/> or <c>null</c> if the key is invalid.</returns>
      Document GetDocument( string key );
      /// <summary>
      /// Gets all the PDF documents.
      /// </summary>
      /// <value>The list of documents.</value>
      IList<Document> GetDocuments();
   }
}
